<template>
  <div>
    <toolbar :view-title="viewTitle">
      <div
        class="leftButton"
        type="button"
        slot="left-button"
        @click="this.$broadcast('goBack')">&nbsp;
      </div>
      <div slot='right-button'>
        <div class="shareButton" @click="shareToMx">
          <span class="shareIcon">&nbsp;</span>
        </div>
      </div>
    </toolbar>
    <div id="introduce">
      <iframe src="./static/page/m/html/overview.html" width="100%" height="100%"></iframe>
    </div>
  </div>
</template>

<script>
  import Toolbar from '../common/Toolbar.vue'
  export default {
    components: {
      Toolbar
    },
    data: function () {
      return {
        viewTitle: '产品概览',
        introduces: ''
      }
    },
    computed: {
//      routerPath: this.$route.path
    },
    methods: {
      goBack: function () {
        window.history.back()
      },
      shareToMx: function () {
        window.cordova.exec(function (success) {
        }, function (error) {
          window.alert('Error: ' + error)
        }, 'MideaCommon', 'mcShare', [
          {
            'title': '分享标题_test',
            'subTitle': '分享子标题',
            'action': 'openH5',
            'widgetId': 'com.midea.demo',
            'widgetExtra': 'key1,value1,key2,value2,key3,value3',
            'url': 'http://www.baidu.com',
            'imageUrl': 'http://pic.nipic.com/2007-11-09/2007119122519868_2.jpg',
            'actionType': '1'
          }
        ])
      }
    },
    ready: function () {
    }
  }

</script>

<style lang="scss" scoped>
  #introduce {
    margin-top: 6.7vh;
    margin-bottom: 7.2vh;
    height: 85.5vh;
    /*overflow-y: scroll;*/
  }

</style>
